package com.anzhen.interview.singleton;

/**
 * 饿汉
 * Created by zhenan on 2017-3-20.
 */
public class Singleton_Hunger {
    private static final Singleton_Hunger SINGLETON_HUNGER = new Singleton_Hunger();

    //限制产生多个对象
    private Singleton_Hunger() {
    }

    //通过该方法获得实例对象
    public static Singleton_Hunger getSingletonHunger() {
        return SINGLETON_HUNGER;
    }

    //类中其他方法，尽量是static
    public static void doSomething() {
    }
}
